package com.xxs.utils;

import java.io.File;
import java.io.IOException;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.w3c.dom.Document;
import org.xml.sax.SAXException;
 
public class Domutils {
  public static Document getDoc(File file) throws SAXException, IOException, ParserConfigurationException {
    DocumentBuilderFactory factory = 
        DocumentBuilderFactory.newInstance();
      DocumentBuilder builder = factory.newDocumentBuilder();  
      Document document = builder.parse(file);
    return document;
  }
}
